package com.sponsorpay.sdk.android.advertiser;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.UrlQuerySanitizer;
import android.os.Bundle;
import com.sponsorpay.sdk.android.utils.SponsorPayLogger;

public class InstallReferrerReceiver extends BroadcastReceiver
{
  private static final String CONTENT_PARAM_KEY = "utm_content";
  private static final String EXTRAS_KEY_REFERRER = "referrer";

  public void onReceive(Context paramContext, Intent paramIntent)
  {
    String str1 = "";
    Bundle localBundle = paramIntent.getExtras();
    if (localBundle != null)
      str1 = localBundle.getString("referrer");
    SponsorPayLogger.i(getClass().getSimpleName(), "Received install referrer. Persisting data. Package name: " + paramContext.getPackageName() + ". Install referrer: " + str1);
    UrlQuerySanitizer localUrlQuerySanitizer = new UrlQuerySanitizer();
    localUrlQuerySanitizer.setAllowUnregisteredParamaters(true);
    localUrlQuerySanitizer.parseQuery(str1);
    String str2 = localUrlQuerySanitizer.getValue("utm_content");
    SponsorPayLogger.i(getClass().getSimpleName(), "SubID extracted from received referrer: " + str2);
    SponsorPayAdvertiserState localSponsorPayAdvertiserState = new SponsorPayAdvertiserState(paramContext);
    localSponsorPayAdvertiserState.setInstallReferrer(str1);
    localSponsorPayAdvertiserState.setInstallSubId(str2);
  }
}

/* Location:           E:\android\Toy Defense 2_dex2jar.jar
 * Qualified Name:     com.sponsorpay.sdk.android.advertiser.InstallReferrerReceiver
 * JD-Core Version:    0.6.2
 */